package car;

public class PassengerBus extends Vechile {

	public PassengerBus(String serialNo, String brand, int seat, int price) {
		super(serialNo, brand, seat, price);
	}

	@Override
	public int calcMoney(int days) {
		int m = super.calcMoney(days);
		/**
		 * days>=3天9折 days>=7天8折 days>=30天7折 days>=150天6折
		 * 
		 */
		if (days >= 150)
			return (int) (days * 0.6);
		if (days >= 30)
			return (int) (days * 0.7);
		if (days >= 7)
			return (int) (days * 0.8);
		if (days >= 3)
			return (int) (days * 0.9);
		return m;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return "客车：" + super.toString();
	}
}
